home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)C / (A)C1.ADF / Utilities / zoo.man < prev    next >
Text File  |  1989-09-12  |  53KB  |  1,075 lines

  1.  
  2.      ZOO(1)         REFERENCE MANUAL  (Aug 25, 1988)            ZOO(1)
  3.  
  4.  
  5.      NAME
  6.           zoo - manipulate archives of files in compressed form
  7.  
  8.      SYNOPSIS
  9.           zoo {acfDeghlLPTuUvVx}[aAcCdEfgImMnNoOpPqSu1:/.@n+-=]
  10.           archive [file] ...
  11.           zoo -command archive [file] ...
  12.           zoo h
  13.  
  14.      DESCRIPTION
  15.           Zoo is used to create and maintain collections of files in
  16.           compressed form.  It uses a Lempel-Ziv compression
  17.           algorithm that gives space savings in the range of 20% to
  18.           80% depending on the type of file data.  Zoo can store and
  19.           selectively extract multiple generations of the same file.
  20.           Data can be recovered from damaged archives by skipping the
  21.           damaged portion and locating undamaged data with the help
  22.           of fiz(1).
  23.  
  24.           This documentation is for version 2.01.  Changes from
  25.           previous versions are described in the section labelled
  26.           CHANGES.
  27.  
  28.           The command zoo h gives summary of commands.
  29.  
  30.           Zoo will not add an archive to itself, nor add the
  31.           archive's backup (with .bak extension to the filename) to
  32.           the archive.
  33.  
  34.           Zoo has two types of commands:  Expert commands, which
  35.           consist of one command letter followed by zero or more
  36.           modifier characters, and Novice commands, which consist of
  37.           a hyphen (`-') followed by a command word that may be
  38.           abbreviated.  Expert commands are case-sensitive but Novice
  39.           commands are not.
  40.  
  41.           When zoo adds a file to an existing archive, the default
  42.           action is to maintain one generation of each file in an
  43.           archive and to mark any older generation as deleted.  A
  44.           limit on the number of generations to save can be specified
  45.           by the user for an entire archive, or for each file
  46.           individually, or both.  Zoo deletes a stored copy of an
  47.           added file if necessary to prevent the number of stored
  48.           generations from exceeding the user-specified limit.
  49.  
  50.           Deleted files may be later undeleted.  Archives may be
  51.           packed to recover space occupied by deleted files.
  52.  
  53.           All commands assume that the archive name ends with the
  54.           characters .zoo unless a different extension is supplied.
  55.  
  56.           Novice commands
  57.  
  58.           Novice commands may be abbreviated to a hyphen followed by
  59.           at least one command character.  Each Novice command works
  60.           in two stages. First, the command does its intended work.
  61.           Then, if the result was that one or more files were deleted
  62.           in the specified archive, the archive is packed. If packing
  63.           occurs, the original unpacked archive is always left behind
  64.           with an extension of .bak.
  65.  
  66.           No Novice command ever stores the directory prefix of a
  67.           file.
  68.  
  69.           The Novice commands are as follows.
  70.  
  71.           -add    Adds the specified files to the archive.
  72.  
  73.           -freshen
  74.                Adds a specified file to the archive if and only if an
  75.                older file by the same name already exists in the
  76.                archive.
  77.  
  78.           -delete
  79.                Deletes the specified files from the archive.
  80.  
  81.           -update
  82.                Adds a specified file to the archive either:  if an
  83.                older file by the same name already exists in the
  84.                archive or:  if a file by the same name does not
  85.                already exist in the archive.
  86.  
  87.           -extract
  88.                Extracts the specified files from the archive.  If no
  89.                file is specified all files are extracted.
  90.  
  91.           -move
  92.                Equivalent to -add except that source files are
  93.                deleted after addition.
  94.  
  95.           -print
  96.                Equivalent to -extract except that extracted data are
  97.                sent to standard output.
  98.  
  99.           -list
  100.                Gives information about the specified archived files
  101.                including any attached comments.  If no files are
  102.                specified all files are listed.  Deleted files are not
  103.                listed.
  104.  
  105.           -test
  106.                Equivalent to -extract except that the extracted data
  107.                are not saved but any errors encountered are reported.
  108.  
  109.           -comment
  110.                Allows the user to add or update comments attached to
  111.                archived files.  When prompted, the user may:  type a
  112.                carriage return to skip the file, leaving any current
  113.                comment unchanged;  or type a (possibly null) comment
  114.                of up to 65,535 characters terminated by /end (case-
  115.                insensitive) on a separate line;  or type the end-of-
  116.                file character (normally control D) to skip all
  117.                remaining files.
  118.  
  119.           -delete
  120.                Deletes the specified files.
  121.  
  122.           The correspondence between Novice and Expert commands is as
  123.           follows.
  124.  
  125.           Novice                                        Equivalent
  126.           Command    Description                        Expert                                                         Command
  127.           ____________________________________________________________
  128.           -add       add files to archive               aP:
  129.           -extract   extract files from archive         x
  130.           -move      move files to archive              aMP:
  131.           -test      test archive integrity             xNd
  132.           -print     extract files to standard output   xp
  133.           -delete    delete files from archive          DP
  134.           -list      list archive contents              VC
  135.           -update    add new or newer files             aunP:
  136.           -freshen   by add newer files                 auP:
  137.           -comment   add comments to files              c
  138.  
  139.           Expert commands
  140.  
  141.           The general format of expert commands is:
  142.  
  143.           zoo {acDeghlLPTuUvVx}[aAcCdEfImMnNoOpPqSu1:/.@n+-=] archive
  144.           [file] ...
  145.  
  146.           The characters enclosed within {} are commands.  Choose any
  147.           one of these. The characters enclosed within [] just to the
  148.           right of the {} are modifiers and zero or more of these may
  149.           immediately follow the command character.  All combinations
  150.           of command and modifier characters may not be valid.
  151.  
  152.           Files are added to an archive with the command:
  153.  
  154.           zoo {au}[cfIMnPqu:+-] archive [file] ...
  155.  
  156.           Command characters are:
  157.  
  158.           a    Add each specified file to archive.  Any already-
  159.                archived copy of the file is deleted if this is
  160.                necessary to avoid exceeding the user-specified limit
  161.                on the number of generations of the file to maintain
  162.                in the archive.
  163.  
  164.           u    Do an update of the archive. A specified file is added
  165.                to the archive only if a copy of it is already in the
  166.                archive and the copy being added is newer than the
  167.                copy already in the archive.
  168.  
  169.           The following modifiers are specific to these commands.
  170.  
  171.           M    Move files to archive.  This makes zoo delete (unlink)
  172.                the original files after they have been added to the
  173.                archive. Files are deleted after addition of all files
  174.                to the archive is complete and after any requested
  175.                packing of the archive has been done, and only if zoo
  176.                detected no errors.
  177.  
  178.           n    Add new files only.  A specified file is added only if
  179.                it isn't already in the archive.
  180.  
  181.           P    Pack archive after files have been added.
  182.  
  183.           u    Applied to the a command, this modifier makes it
  184.                behave identically to the u command.
  185.  
  186.                The combination of the n modifier with the u modifier
  187.                or u command causes addition of a file to the archive
  188.                either if the file is not already in the archive, or
  189.                if the file is already in the archive but the archived
  190.                copy is older than the copy being added.
  191.  
  192.           :    Do not store directory names.  In the absence of this
  193.                modifier zoo stores the full pathname of each archived
  194.                file.
  195.  
  196.           I    Read filenames to be archived from standard input. Zoo
  197.                will read its standard input and assume that each line
  198.                of text contains a filename.  Under AmigaDOS and the
  199.                **IX family, the entire line is used. Under MS-DOS and
  200.                VAX/VMS, zoo assumes that the filename is terminated
  201.                by a blank, tab, or newline; thus it is permissible
  202.                for the line of text to contain more than one field
  203.                separated by white space, and only the first field
  204.                will be used.
  205.  
  206.                Under the **IX family of operating systems, zoo can be
  207.                used as follows in a pipeline:
  208.  
  209.                     find . -print | zoo aI sources
  210.  
  211.  
  212.  
  213.                If the I modifier is specified, no filenames may be
  214.                supplied on the command line itself.
  215.  
  216.           +,-  These modifiers take effect only if the a command
  217.                results in the creation of a new archive. + causes any
  218.                newly-created archive to have generations enabled. -
  219.                is provided for symmetry and causes any newly-created
  220.                archive to have generations disabled; this is also the
  221.                default if neither + nor - is specified.
  222.  
  223.           Files are extracted from an archive with the command:
  224.  
  225.           zoo {ex}[dNoOpqS./@] archive [file] ...
  226.  
  227.           The e and x commands are synonymous.  If no file was
  228.           specified, all files are extracted from the archive.
  229.  
  230.           The following modifiers are specific to the e and x
  231.           commands:
  232.  
  233.           N    Do not save extracted data but report any errors
  234.                encountered.
  235.  
  236.           O    Overwrite files.  Normally, if a file being extracted
  237.                would overwrite an already-existing file of the same
  238.                name, zoo asks you if you really want to overwrite it.
  239.                You may answer the question with `y', which means yes,
  240.                overwrite; or `n', which means no, don't overwrite; or
  241.                `a', which means assume the answer is `y' for this and
  242.                all subsequent files.  The O modifier makes zoo assume
  243.                that files may always be overwritten.  Neither
  244.                answering the question affirmatively nor using O alone
  245.                will cause read-only files to be overwritten.
  246.  
  247.                On **IX systems, however, doubling this modifier as OO
  248.                will force zoo to unconditionally overwrite any read-
  249.                protected files with extracted files if it can do so.
  250.  
  251.                The O, N, and p modifiers are mutually exclusive.
  252.  
  253.           S    Supersede newer files on disk with older extracted
  254.                files.  Unless this modifier is used, zoo will not
  255.                overwrite a newer existing file with an older
  256.                extracted file.
  257.  
  258.           o    This is equivalent to the O modifier if and only if it
  259.                is given at least twice.  It is otherwise ignored.
  260.  
  261.           p    Pipe extracted data to standard output. Error messages
  262.                are piped to standard output as well.  However, if a
  263.                bad CRC is detected, an error message is sent both to
  264.                standard error and to standard output.
  265.  
  266.           /    Extract to original pathname.  Any needed directories
  267.                must already exist.  In the absence of this modifier
  268.                all files are extracted into the current directory. If
  269.                this modifier is doubled as //, required directories
  270.                need not exist and are created if necessary.
  271.  
  272.           The management of multiple generations of archived files is
  273.           done with the commands:
  274.  
  275.           zoo gl[Aq]{+-=}number archive files ..
  276.           zoo gc[q]{+-=}number archive files ..
  277.           zoo gA[q]- archive
  278.           zoo gA[q]+ archive
  279.  
  280.           The first form, gl, adjusts the generation limit of
  281.           selected files by the specified value. If the form =n is
  282.           used, where n is a decimal number, this sets the generation
  283.           limit to the specified value. If + or - are used in placed
  284.           of = the effect is to increment or decrement the generation
  285.           limit by the specified value.  For example, the command
  286.  
  287.                zoo gl=5 xyz :
  288.  
  289.           sets the generation limit of each file in the archive
  290.           xyz.zoo to a value of 5.  The command
  291.  
  292.                zoo gl-3 xyz :
  293.  
  294.  
  295.           decrements the generation limit of each file in the archive
  296.           to 3 less than it currently is.
  297.  
  298.           If the A modifier is used, the archive-wide generation
  299.           limit is adjusted instead.
  300.  
  301.           The number of generations of a file maintained in an
  302.           archive is limited by the file generation limit, or the
  303.           archive generation limit, whichever is lower. As a special
  304.           case, a generation limit of 0 stands for no limit. Thus the
  305.           default file generation limit of 0 and archive generation
  306.           limit of 1 limits the number of generations of each file in
  307.           a newly-created archive to one.
  308.  
  309.           The generation limit specified should be in the range 0
  310.           through 15;  any higher numbers are interpreted modulo 16.
  311.  
  312.           The second form of the command, using gc, adjusts the
  313.           generation count of selected files.  Each file has a
  314.           generation count of 1 when it is first added to an archive.
  315.           Each time a file by the same name is added again to an
  316.           archive, it receives a generation count that is one higher
  317.           than the highest generation count of the archived copy of
  318.           the file.  The permissible range of generation counts is 1
  319.           through 65535.  If repeated manipulations of an archive
  320.           result in files having very high generation counts, they
  321.           may be set back to lower numbers with the gc command.  The
  322.           syntax of the command is analogous to the syntax of the gl
  323.           command, except that the A modifier is not applicable to
  324.           the gc command.
  325.  
  326.           The third form, gA-, disables generations in an archive.
  327.           Generations are off when an archive is first created, but
  328.           may be enabled with the fourth form of the command, gA+.
  329.           When generations are disabled in an archive, zoo will not
  330.           display generation numbers in archive listings or maintain
  331.           multiple generations.  Generations can be re-enabled at any
  332.           time, though manipulation of an archive with repeated
  333.           interspersed gA- and gA+ commands may result in an archive
  334.           whose behavior is not easily understandable.
  335.  
  336.           Archived files are listed with the command:
  337.  
  338.           zoo {lLvV}[aAcCdfgmqvV@/1+-] archive[.zoo] [file] ...
  339.  
  340.           l    Information presented includes the date and time of
  341.                each file, its original and current (compressed)
  342.                sizes, and the percentage size decrease due to
  343.                compression (labelled CF or compression factor). If a
  344.                file was added to the archive in a different timezone,
  345.                the difference between timezones is shown in hours as
  346.                a signed number. As an example, if the difference is
  347.                listed as +3, this means that the file was added to
  348.                the archive in a timezone that is 3 hours west of the
  349.                current timezone.  The file time listed is, however,
  350.                always the original timestamp of the archived file, as
  351.                observed by the user who archived the file, expressed
  352.                as that user's local time.  (Timezone information is
  353.                stored and displayed only if the underlying operating
  354.                system knows about timezones.)
  355.  
  356.                If no filename is supplied all files are listed except
  357.                deleted files.
  358.  
  359.                Zoo selects which generation(s) of a file to list
  360.                according to the following algorithm.
  361.  
  362.                If no filename is supplied, only the latest generation
  363.                of each file is listed.  If any filenames are
  364.                specified, and a generation is specified for an
  365.                argument, only the requested generation is listed. If
  366.                a filename is specified ending with the generation
  367.                character (`:' or `;'), all generations of that file
  368.                are listed. Thus a filename argument of the form zoo.c
  369.                will cause only the latest generation of zoo.c to be
  370.                listed;  an argument of the form zoo.c:4 will cause
  371.                generation 4 of zoo.c to be listed; and an argument of
  372.                the form zoo.c: or zoo.c:* will cause all generations
  373.                of zoo.c to be listed.
  374.  
  375.           L    This is similar to the l command except that all
  376.                supplied arguments must be archives and all
  377.                non-deleted generations of all files in each archive
  378.                appear in the listing.
  379.  
  380.                On **IX systems, on which the shell expands arguments,
  381.                if multiple archives are to be listed, the L command
  382.                must be used.  On other systems (VAX/VMS, AmigaDOS,
  383.                MSDOS) on which wildcard expansion is done internally
  384.                by zoo, wildcards may be used in the archive name, and
  385.                a multiple archive listing obtained, using the l
  386.                command.
  387.  
  388.           v    This causes any comment attached to the archive to be
  389.                listed in addition to the other information.
  390.  
  391.           V    This causes any comment attached to the archive and
  392.                also any comment attached to each file to be listed.
  393.  
  394.                Both the V and v command characters can also be used
  395.                as modifiers to the l and L commands.
  396.  
  397.           In addition to the general modifiers described later, the
  398.           following modifiers can be applied to the archive list
  399.           commands.
  400.  
  401.           a    This gives a single-line format containing both each
  402.                filename and the name of the archive, sorted by
  403.                archive name. It is especially useful with the L
  404.                command, since the result can be further sorted on any
  405.                field to give a master listing of the entire contents
  406.                of a set of archives.
  407.  
  408.           A    This causes any comment attached to the archive to be
  409.                listed.
  410.  
  411.           g    This modifier causes file generation information to be
  412.                listed about the archive.  For each file listed, the
  413.                user-specified generation limit, if any, is listed.
  414.                For example, `3g' for a file means that the user wants
  415.                no more than three generations of the file to be kept.
  416.                In archives created by older versions of zoo, the
  417.                listing will show `-g', meaning that no generation
  418.                information is kept and multiple generations of the
  419.                file are not being maintained.
  420.  
  421.                In addition to the generation information for each
  422.                file, the archive-wide generation limit, if any, is
  423.                shown at the end of the listing.  If generations have
  424.                been disabled by the user, this is so indicated, for
  425.                example:
  426.  
  427.                     Archive generation limit is 3 (generations off).
  428.  
  429.                For more information about generations see the
  430.                description of the g command.
  431.  
  432.           m    This modifier is currently applicable to **IX systems
  433.                only.  It causes the mode bits (file protection code)
  434.                of each file to be listed as a three-digit octal
  435.                number.  Currently zoo preserves only the lowest nine
  436.                mode bits. Their meanings are as described in the **IX
  437.                documentation for the chmod(1) command.
  438.  
  439.           C    This modifier causes the stored cyclic redundancy code
  440.                (CRC) for each archived file to be shown as a four-
  441.                digit hexadecimal number.
  442.  
  443.           1    This forces one filename to be listed per line.  It is
  444.                most useful in combination with the f modifier.
  445.  
  446.           /    This forces any directory name to be always listed,
  447.                even in fast columnized listings that do not normally
  448.                include any directory names.
  449.  
  450.           +,-  The - modifier causes trailing generation numbers to
  451.                be omitted from filenames. The + modifier causes the
  452.                trailing generation numbers to be shown, which is also
  453.                the default if neither - nor + is specified.
  454.  
  455.           Files may be deleted and undeleted from an archive with the
  456.           following commands:
  457.  
  458.           zoo {DU}[Pq1] archive file ...
  459.  
  460.           The D command deletes the specified files and the U command
  461.           undeletes the specified files.  The 1 modifier (the digit
  462.           one, not the letter ell) forces deletion or undeletion of
  463.           at most one file. If multiple instances of the same file
  464.           exist in an archive, use of the 1 modifier may allow
  465.           selective extraction of one of these.
  466.  
  467.           Comments may be added to an archive with the command:
  468.  
  469.           zoo c[A] archive
  470.  
  471.           Without the modifier A, this behaves identically to the
  472.           -comment command.  With the modifier A, the command serves
  473.           to add or update the comment attached to the archive as a
  474.           whole. This comment may be listed with the lA, LA, v, and V
  475.           commands. Applying the cA command to an archive that was
  476.           created with an older version of zoo will result in an
  477.           error message requesting that the user first pack the
  478.           archive with the P command. This reorganizes the archive
  479.           and creates space for the archive comment.
  480.  
  481.           The timestamp of an archive may be adjusted with the
  482.           command:
  483.  
  484.           zoo T[q] archive
  485.  
  486.           Zoo normally attempts to maintain the timestamp of an
  487.           archive to reflect the age of the newest file stored in it.
  488.           Should the timestamp ever be incorrect it can be fixed with
  489.           the T command.
  490.  
  491.           An archive may be packed with the command:
  492.  
  493.           zoo P[EPq] archive
  494.  
  495.           If the backup copy of the archive already exists, zoo will
  496.           refuse to pack the archive unless the P modifier is also
  497.           given.  The E modifier causes zoo not to save a backup copy
  498.           of the original archive after packing.  A unique temporary
  499.           file in the current directory is used to initially hold the
  500.           packed archive. This file will be left behind if packing is
  501.           interrupted or if for some reason this file cannot be
  502.           renamed to the name of the original archive when packing is
  503.           complete.
  504.  
  505.           Packing removes any garbage data appended to an archive
  506.           because of Xmodem file transfer and also recovers any
  507.           wasted space remaining in an archive that has been
  508.           frequently updated or in which comments were replaced.
  509.           Packing also updates the format of any archive that was
  510.           created by an older version of zoo so that newer features
  511.           (e.g. archive-wide generation limit, archive comment)
  512.           become fully available.
  513.  
  514.           Zoo can act as a pure compression or uncompression filter,
  515.           reading from standard input and writing to standard output.
  516.           This is achieved with the command:
  517.  
  518.           zoo f{cu}
  519.  
  520.           where c specifies compression and u specifies
  521.           uncompression. A CRC value is used to check the integrity
  522.           of the data. The compressed data stream has no internal
  523.           archive structure and contains multiple files only if the
  524.           input data stream was already structured, as might be
  525.           obtained, for example, from tar or cpio.
  526.  
  527.            Modem transfers can be speeded up with these commands:
  528.  
  529.                     zoo fc < file | sz ... rz | zoo fu > file
  530.  
  531.  
  532.  
  533.           General modifiers
  534.  
  535.           The following modifiers are applicable to several commands:
  536.  
  537.           c    Applied to the a and u commands, this causes the user
  538.                to be prompted for a comment for each file added to
  539.                the archive. If the file being added has replaced, or
  540.                is a newer generation of, a file already in the
  541.                archive, any comment attached to that file is shown to
  542.                the user and becomes attached to the newly-added file
  543.                unless the user changes it. Possible user responses
  544.                are as described for the -comment command. Applied to
  545.                the archive list command l, the c modifier causes the
  546.                listing of any comments attached to archived files.
  547.  
  548.            .   In conjunction with / or // this modifier causes any
  549.                extracted pathname beginning with `/' to be
  550.                interpreted relative to the current directory,
  551.                resulting in the possible creation of a subtree rooted
  552.                at the current directory. In conjunction with the
  553.                command P the . modifier causes the packed archive to
  554.                be created in the current directory. This is intended
  555.                to allow users with limited disk space but multiple
  556.                disk drives to pack large archives.
  557.  
  558.           d    Most commands that act on an archive act only on files
  559.                that are not deleted.  The d modifier makes commands
  560.                act on both normal and deleted files.  If doubled as
  561.                dd, this modifier forces selection only of deleted
  562.                files.
  563.  
  564.           f    Applied to the a and u commands, the f modifier causes
  565.                fast archiving by adding files without compression.
  566.                Applied to l it causes a fast listing of files in a
  567.                multicolumn format.
  568.  
  569.           q    Be quiet. Normally zoo lists the name of each file and
  570.                what action it is performing.  The q modifier
  571.                suppresses this.  When files are being extracted to
  572.                standard output, the q modifier suppresses the header
  573.                preceding each file.  When archive contents are being
  574.                listed, this modifier suppresses any header and
  575.                trailer.  When a fast columnized listing is being
  576.                obtained, this modifier causes all output to be
  577.                combined into a single set of filenames for all
  578.                archives being listed.
  579.  
  580.                When doubled as qq, this modifier suppresses WARNING
  581.                messages, and when tripled as qqq, ERROR messages are
  582.                suppressed too.  FATAL error messages are never
  583.                suppressed.
  584.  
  585.           Recovering data from damaged archives
  586.  
  587.           The @ modifier allows the user to specify the exact
  588.           position in an archive where zoo should extract a file
  589.           from, allowing damaged portions of an archive to be
  590.           skipped. This modifier must be immediately followed by a
  591.           decimal integer without intervening spaces, and possibly by
  592.           a comma and another decimal integer, giving a command of
  593.           the form l@m or l@m,n (to list archive contents) or x@m or
  594.           x@m,n (to extract files from an archive). Listing or
  595.           extraction begin at position m in the archive. The value of
  596.           m must be the position within the archive of an undamaged
  597.           directory entry. This position is usually obtained from
  598.           fiz(1) version 2.0 or later.
  599.  
  600.           If damage to the archive has shortened or lengthened it,
  601.           all positions within the archive may be changed by some
  602.           constant amount. To compensate for this, the value of n may
  603.           be specified. This value is also usually obtained from
  604.           fiz(1). It should be the position in the archive of the
  605.           file data corresponding to the directory entry that has
  606.           been specified with m. Thus if the command x@456,575 is
  607.           given, it will cause the first 456 bytes of the archive to
  608.           be skipped and extraction to begin at offset 456; in
  609.           addition, zoo will attempt to extract the file data from
  610.           position 575 in the archive instead of the value that is
  611.           found in the directory entry read from the archive.  For
  612.           example, here is some of the output of fiz when it acts on
  613.           a damaged zoo archive:
  614.  
  615.           ****************
  616.               2526: DIR  [changes] ==>   95
  617.               2587: DATA
  618.           ****************
  619.               3909: DIR  [copyrite] ==> 1478
  620.               3970: DATA
  621.               4769: DATA
  622.           ****************
  623.  
  624.           In such output, DIR indicates where fiz found a directory
  625.           entry in the archive, and DATA indicates where fiz found
  626.           file data in the archive.  Filenames located by fiz are
  627.           enclosed in square brackets, and the notation "==>   95"
  628.           indicates that the directory entry found by fiz at position
  629.           2526 has a file data pointer to position 95.  (This is
  630.           clearly wrong, since file data always occur in an archive
  631.           after their directory entry.)  In actuality, fiz found file
  632.           data at positions 2587, 3970, and 4769.  Since fiz found
  633.           only two directory entries, and each directory entry
  634.           corresponds to one file, one of the file data positions is
  635.           an artifact.
  636.  
  637.           In this case, commands to try giving to zoo might be
  638.           x@2526,2587 (extract beginning at position 2526, and get
  639.           file data from position 2587), x@3090,3970 (extract at
  640.           3090, get data from 3970) and x@3909,4769 (extract at 3909,
  641.           get data from 4769). Once a correctly-matched directory
  642.           entry/file data pair is found, zoo will in most cases
  643.           synchronize with and correctly extract all files
  644.           subsequently found in the archive.  Trial and error should
  645.           allow all undamaged files to be extracted.  Also note that
  646.           self-extracting archives created using sez (the Self-
  647.           Extracting Zoo utility for MS-DOS), which are normally
  648.           executed on an MS-DOS system for extraction, can be
  649.           extracted on non-MSDOS systems using zoo's damaged-archive
  650.           recovery method using the @ modifier.
  651.  
  652.           Wildcard handling
  653.  
  654.           Under the **IX family of operating systems, the shell
  655.           normally expands wildcards to a list of matching files.
  656.           Wildcards that are meant to match files within an archive
  657.           must therefore be escaped or quoted.  When selecting files
  658.           to be added to an archive, wildcard conventions are as
  659.           defined for the shell.  When selecting files from within an
  660.           archive, wildcard handling is done by zoo as described
  661.           below.
  662.  
  663.           Under MS-DOS and AmigaDOS, quoting of wildcards is not
  664.           needed. All wildcard expansion of filenames is done by zoo,
  665.           and wildcards inside directory names are expanded only when
  666.           listing or extracting files but not when adding them.
  667.  
  668.           The wildcard syntax interpreted by zoo is limited to the
  669.           following characters.
  670.  
  671.           *    Matches any sequence of zero or more characters.
  672.  
  673.           ?    Matches any single character.
  674.  
  675.                Arbitrary combinations of * and ? are allowed.
  676.  
  677.           /    If a supplied pattern contains a slash anywhere in it,
  678.                then the slash separating any directory prefix from
  679.                the filename must be matched explicitly. If a supplied
  680.                pattern contains no slashes, the match is selective
  681.                only on the filename.
  682.  
  683.           c-c  Two characters separated by a hyphen specify a
  684.                character range.  All filenames beginning with those
  685.                characters will match.  The character range is
  686.                meaningful only by itself or preceded by a directory
  687.                name. It is not specially interpreted if it is part of
  688.                a filename.
  689.  
  690.           : and ;
  691.                These characters are used to separate a filename from
  692.                a generation number and are used when selecting
  693.                specific generations of archived files. If no
  694.                generation character is used, the filename specified
  695.                matches only the latest generation of the file. If the
  696.                generation character is specified, the filename and
  697.                the generation are matched independently by zoo's
  698.                wildcard mechanism. If no generation is specified
  699.                following the : or ; character, all generations of
  700.                that file will match. As a special case, a generation
  701.                number of 0 matches only the latest generation of a
  702.                file, while ^0 matches all generations of a file
  703.                except the latest one. If no filename is specified
  704.                preceding the generation character, all filenames will
  705.                match. As a corollary, the generation character by
  706.                itself matches all generations of all files.
  707.  
  708.           MS-DOS users should note that zoo does not treat the dot as
  709.           a special character, and it does not ignore characters
  710.           following an asterisk.  Thus * matches all filenames; *.*
  711.           matches filenames containing a dot; *_* matches filenames
  712.           containing an underscore; and *z matches all filenames that
  713.           end with the character z, whether or not they contain a
  714.           dot.
  715.  
  716.           Usage hints
  717.  
  718.           The Novice command set in zoo is meant to provide an
  719.           interface with functionality and format that will be
  720.           familiar to users of other similar archive utilities.  In
  721.           keeping with this objective, the Novice commands do not
  722.           maintain or use any subdirectory information or allow the
  723.           use of zoo's ability to maintain multiple generations of
  724.           files.  For this reason, users should switch to exclusively
  725.           using the Expert commands as soon as possible.
  726.  
  727.           Although the Expert command set is quite large, it should
  728.           be noted that in almost every case, all legal modifiers for
  729.           a command are fully orthogonal. This means that the user
  730.           can select any combination of modifiers, and when they act
  731.           together, they will have the intuitively obvious effect.
  732.           Thus the user need only memorize what each modifier does,
  733.           and then can combine them as needed without much further
  734.           thought.
  735.  
  736.           For example, consider the a command which is used to add
  737.           files to an archive.  By itself, it simply adds the
  738.           specified files. To cause only already-archived files to be
  739.           updated if their disk copies have been modified, it is only
  740.           necessary to add the u modifier, making the command au.  To
  741.           cause only new files (i.e., files not already in the
  742.           archive) to be added, the n modifier is used to create the
  743.           command an.  To cause both already-archived files to be
  744.           updated and new files to be added, the u and n modifiers
  745.           can be used together, giving the command aun. Since the
  746.           order of modifiers is not significant, the command could
  747.           also be anu.
  748.  
  749.           Further, the c modifier can be used to cause zoo to prompt
  750.           the user for a comment to attach to each file added.  And
  751.           the f modifier can cause fast addition (addition without
  752.           compression).  It should be obvious then that the command
  753.           auncf will cause zoo to update already-archived files, add
  754.           new files, prompt the user for comments, and do the
  755.           addition of files without any compression.  Furthermore, if
  756.           the user wishes to move files to the archive, i.e., delete
  757.           the disk copy of each file after it is added to the 
  758.           archive, it is only necessary to add the M modifier to the
  759.           command, so it becomes auncfM. And if the user also wishes
  760.           to cause the archive to be packed as part of the command,
  761.           thus recovering space from any files that are replaced, the
  762.           command can be modified to auncfMP by adding the P modifier
  763.           that causes packing.
  764.  
  765.           Similarly, the archive listing commands can be built up by
  766.           combining modifiers. The basic command to list the contents
  767.           of an archive is l.  If the user wants a fast columnized
  768.           listing, the f modifier can be added to give the lf
  769.           command. Since this listing will have a header giving the
  770.           archive name and a trailer summarizing interesting
  771.           information about the archive, such as the number of
  772.           deleted files, the user may wish to "quieten" the listing
  773.           by suppressing these; the relevant modifier is q, which
  774.           when added to the command gives lfq. If the user wishes to
  775.           see the **IX mode (file protection) bits, and also
  776.           information about multiple generations, the modifiers m
  777.           (show mode bits) and g (show generation information) can be
  778.           added, giving the command lfqmg. If the user also wishes to
  779.           see an attached archive comment, the modifier A (for
  780.           archive) will serve. Thus the command lfqmgA will give a
  781.           fast columnized listing of the archive, suppressing any
  782.           header and trailer, showing mode bits and generation
  783.           information, and showing any comment attached to the
  784.           archive as a whole. If in addition individual comments
  785.           attached to files are also needed, simply append the c
  786.           modifier to the command, making it lfqmgAc. The above
  787.           command will not show any deleted files, however; to see
  788.           them, use the d modifier, making the command lfqmgAcd (or
  789.           double it as in lfqmgAcdd if only the deleted files are to
  790.           be listed). And if the user also wishes to see the CRC
  791.           value for each file being listed, the modifier C will do
  792.           this, as in the command lfqmgAcdC, which gives a fast
  793.           columnized listing of all files, including deleted files,
  794.           showing any archive comment and file comments, and file
  795.           protection codes and generation information, as well as the
  796.           CRC value of each file. 
  797.  
  798.           Note that the above command lfqmgAcdC could also be
  799.           abbreviated to VfqmgdC because the command V is shorthand
  800.           for lcA (archive listing with all comments shown).
  801.           Similarly the command v is shorthand for lA (archive
  802.           listing with archive comment shown). Both V and v can be
  803.           used as modifiers to any of the other archive listing
  804.           commands.
  805.  
  806.           Generations
  807.  
  808.           By default, zoo assumes that only the latest generation of a
  809.           specified file is needed.  If generations other than the
  810.           latest one need to be selected, this may be done by
  811.           specifying them in the filename. For example, the name
  812.           stdio.h would normally refer to the latest generation of
  813.           the file stdio.h stored in a zoo archive. To get an archive
  814.           listing showing all generations of stdio.h in the archive,
  815.           the specification stdio.h:* could be used (enclosed in
  816.           single quotes if necessary to protect the wildcard
  817.           character * from the shell). Also, stdio.h:0 selects only
  818.           the latest generation of stdio.h, while stdio.h:^0 selects
  819.           all generations except the latest one. The : character here
  820.           separates the filename from the generation number, and the
  821.           character * is a wildcard that matches all possible
  822.           generations.  For convenience, the generation itself may be
  823.           left out, so that the name stdio.h: (with the : but without
  824.           a generation number or a wildcard) matches all generations
  825.           exactly as stdio.h:* does.
  826.  
  827.           If a generation is specified but no filename is present, as
  828.           in :5, :*, or just :, all filenames of the specified
  829.           generation will be selected.  Thus :5 selects generation 5
  830.           of each file, and :* and : select all generations of all
  831.           files.
  832.  
  833.           It is important to note that zoo's idea of the latest
  834.           generation of a file is not based upon searching the entire
  835.           archive.  Instead, whenever zoo adds a file to an archive,
  836.           it is marked as being the latest generation.  Thus, if the
  837.           latest generation of a file is deleted, then no generation
  838.           of that file is considered the latest any more. This can be
  839.           surprising to the user.  For example, if an archive already
  840.           contains the file stdio.h:5 and a new copy is added,
  841.           appearing in the archive listing as stdio.h:6, and then
  842.           stdio.h:6 is deleted, the remaining copy stdio.h:5 will no
  843.           longer be considered to be the latest generation, and the
  844.           file stdio.h:5, even if undeleted, will no longer appear in
  845.           an archive listing unless generation 5 (or every
  846.           generation) is specifically requested. This behavior will
  847.           likely be improved in future releases of zoo.
  848.  
  849.      FILES
  850.           xXXXXXX - temporary file used during packing
  851.           archive_name.bak - backup of archive
  852.  
  853.      SEE ALSO
  854.           compress(1), fiz(1)
  855.  
  856.      BUGS
  857.           When files are being added to an archive on a non-MS-DOS
  858.           system, it is possible for zoo to fail to detect a full
  859.           disk and hence create an invalid archive.  This bug will be
  860.           fixed in a future release.
  861.  
  862.           Files with generation counts that wrap around from 65535 to
  863.           1 are not currently handled correctly.  If a file's
  864.           generation count reaches a value close to 65535, it should
  865.           be manually set back down to a low number.  This may be
  866.           easily done with a command such as gc-65000, which
  867.           subtracts 65000 from the generation count of each specified
  868.           file. This problem will be fixed in a future release.
  869.  
  870.           Although zoo on **IX systems preserves the lowest nine mode
  871.           bits of regular files, it does not currently do the same
  872.           for directories.
  873.  
  874.           Currently zoo's handling of the characters : and ; in
  875.           filenames is not robust, because it interprets these to
  876.           separate a filename from a generation number.  A quoting
  877.           mechanism will eventually be implemented.
  878.  
  879.           Standard input cannot be archived nor can a created archive
  880.           be sent to standard output.  Spurious error messages may
  881.           appear if the filename of an archive is too long.
  882.  
  883.           Since zoo never archives any file with the same name as the
  884.           archive or its backup (regardless of any path prefixes),
  885.           care should be taken to make sure that a file to be
  886.           archived does not coincidentally have the same name as the
  887.           archive it is being added to. It usually suffices to make
  888.           sure that no file being archived is itself a zoo archive.
  889.           (Previous versions of zoo sometimes tried to add an archive
  890.           to itself. This bug now seems to be fixed.)
  891.  
  892.           Only regular files are archived; devices and empty
  893.           directories are not. Support for archiving empty
  894.           directories and for preserving directory attributes is
  895.           planned for the near future.
  896.  
  897.           Early versions of MS-DOS have a bug that prevents "." from
  898.           referring to the root directory;  this leads to anomalous
  899.           results if the extraction of paths beginning with a dot is
  900.           attempted.
  901.  
  902.           VAX/VMS destroys case information unless arguments are
  903.           enclosed in double quotes.  For this reason if a command
  904.           given to zoo on a VAX/VMS system includes any uppercase
  905.           characters, it must be enclosed in double quotes.  Under
  906.           VAX/VMS, zoo does not currently restore file timestamps;
  907.           this will be fixed as soon as I figure out RMS extended
  908.           attribute blocks, or DEC supplies a utime() function,
  909.           whichever occurs first.  Other VMS bugs, related to file
  910.           structures, can often be overcome by using the program
  911.           bilf.c that is supplied with zoo.
  912.  
  913.           It is not currently possible to create a zoo archive
  914.           containing all zoo archives that do not contain themselves.
  915.  
  916.      DIAGNOSTICS
  917.           Error messages are intended to be self-explanatory and are
  918.           divided into three categories.  WARNINGS are intended to
  919.           inform the user of an unusual situation, such as a CRC
  920.           error during extraction, or -freshening of an archive
  921.           containing a file newer than one specified on the command
  922.           line. ERRORS are fatal to one file, but execution continues
  923.           with the next file if any. FATAL errors cause execution to
  924.           be aborted. The occurrence of any of these causes an exit
  925.           status of 1. Normal termination without any errors gives an
  926.           exit status of 0.  (Under VAX/VMS, however, to avoid an
  927.           annoying message, zoo always exits with an error code of
  928.           1.)
  929.  
  930.      COMPATIBILITY
  931.           All versions of zoo on all systems are required to create
  932.           archives that can be extracted and listed with all versions
  933.           of zoo on all systems, regardless of filename and directory
  934.           syntax or archive structure;  furthermore, any version of
  935.           zoo must be able to fully manipulate all archives created
  936.           by all lower-numbered versions of zoo on all systems. So
  937.           far as I can tell, this upward compatiblity (all
  938.           manipulations) and downward compatiblity (ability to
  939.           extract and list) is maintained by zoo version 2.0. You are
  940.           forbidden, with the force of copyright law, to create from
  941.           the zoo source code any derivative work that violates this
  942.           compatibility goal, whether knowingly or through
  943.           negligence. If any violation of this compatibility goal is
  944.           observed-i.e., if you are able to use an implementation of
  945.           zoo to create an archive that some implementation of zoo on
  946.           any system cannot extract-this should be considered a
  947.           serious problem and reported to me.
  948.  
  949.      CHANGES
  950.           Here is a list of changes occurring from version 1.50 to
  951.           version 2.01.  In parentheses is given the version in which
  952.           each change occurred.
  953.  
  954.           -   (1.71) New modifiers to the list commands permit
  955.               optional suppression of header and trailer information,
  956.                inclusion of directory names in columnized listings,
  957.                and fast one-column listings.
  958.  
  959.           -    (1.71) Timezones are handled.
  960.  
  961.           -    (1.71) A bug was fixed that had made it impossible to
  962.                individually update comments for a file whose name did
  963.                not correspond to MS-DOS format.
  964.  
  965.           -    (1.71) A change was made that now permits use of the
  966.                shared library on the **IX PC.
  967.  
  968.           -    (1.71) VAX/VMS is now supported reasonably well.
  969.  
  970.           -    (2.00) A comment may now be attached to the archive
  971.                itself.
  972.  
  973.           -    (2.00) The OO option allows forced overwriting of
  974.                read-only files.
  975.  
  976.           -    (2.00) Zoo will no longer extract a file if a newer
  977.                copy already exists on disk;  the S option will
  978.                override this.
  979.  
  980.           -    (2.00) File attributes are preserved for **IX systems.
  981.  
  982.           -    (2.00) Multiple generations of the same file are
  983.                supported.
  984.  
  985.           -   (2.00) Zoo will now act as a compression or
  986.               decompression filter on a stream of data and will use a
  987.               CRC value to check the integrity of a data stream that
  988.               is uncompressed.
  989.  
  990.           -   (2.00) A bug was fixed that caused removal of a
  991.               directory link if files were moved to an archive by the
  992.                superuser on a **IX system.
  993.  
  994.           -    (2.00) The data recovery modifier @ was greatly
  995.                enhanced.  Self-extracting archives created for MS-DOS
  996.                systems can now be extracted by zoo on any system with
  997.                help from fiz(1).
  998.  
  999.           -    (2.01) A bug was fixed that had caused the first
  1000.                generation of a file to sometimes unexpectedly show up
  1001.                in archive listings.
  1002.  
  1003.           -    (2.01) A bug was fixed that had caused the MS-DOS
  1004.                version to silently skip files that could not be
  1005.                extracted because of insufficient disk space.
  1006.  
  1007.           -   (2.01) A bug was fixed that had sometimes made it
  1008.               impossible to selectively extract a file by specifying
  1009.               its name, even though all files could be extracted from
  1010.                the archive by not specifying any filenames.  This
  1011.                occurred when a file had been archived on a longer-
  1012.                filename system (e.g. AmigaDOS) and extraction was
  1013.                attempted on a shorter-filename system (e.g. MS-DOS).
  1014.  
  1015.           -    (2.01) A change was made that will make zoo preserve
  1016.                the mode (file protection) of a zoo archive when it is
  1017.                packed.  This is effective only if zoo is compiled to
  1018.                preserve and restore file attributes.  Currently this
  1019.                is so only for **IX systems.
  1020.  
  1021.           -    (2.01) A bug was fixed that had caused an update of an
  1022.                archive to not always add all newer files.
  1023.  
  1024.           -    (2.01) Blanks around equal signs in commands given to
  1025.                "make" were removed from the mk* scripts for better
  1026.                compatiblity with more **IX implementations including
  1027.                Sun's.
  1028.  
  1029.      FUTURE DIRECTIONS
  1030.           A revised version of zoo is in the works that will be able
  1031.           to write newly-created archives to standard output, and
  1032.           will also automatically perform end-of-line conversion for
  1033.           text files moved between dissimilar systems.  It will be
  1034.           upward and downward compatible with existing versions of
  1035.           zoo.
  1036.  
  1037.      ACKNOWLEDGEMENTS
  1038.           The zoo archiver was initially developed using Microsoft C
  1039.           3.0 on a PC clone manufactured by Toshiba of Japan and
  1040.           almost sold by Xerox. Availability of the following systems
  1041.           was helpful in achieving portability:  Paul Homchick's
  1042.           Compaq running Microport System V/AT;  The Eskimo BBS
  1043.           somewhere in Oregon running Xenix/68000; Greg Laskin's
  1044.           system 'gryphon' which is an Intel 310 running Xenix/286;
  1045.           Ball State University's AT&T 3B2/300, UNIX PC, and VAX-
  1046.           11/785 (4.3BSD) systems.  In addition J. Brian Waters
  1047.           provided feedback to help me make the code compilable on
  1048.           his  Amiga using Manx/Aztec C.  More recently, actual
  1049.           development, as opposed to portability testing, has been
  1050.           done exclusively on my own AT from PC's Limited running
  1051.           Microport System V/AT.  The executable version 2.0 for MS-
  1052.           DOS is currently compiled with Borland's Turbo C 1.0.
  1053.  
  1054.           Special thanks are due to:
  1055.  
  1056.           J. Brian Waters <uunet!bsu-cs!jbwaters>, who has worked
  1057.           diligently to port zoo to AmigaDOS, created Amiga-specific
  1058.           code, and continues keeping it updated.
  1059.  
  1060.           Paul Homchick <rutgers!cgh!paul>, who provided numerous
  1061.           detailed reports about some nasty bugs.
  1062.  
  1063.           Bill Davidsen <steinmetz!crdos1!davidsen>, who fixed zoo's
  1064.           handling of daylight savings time, provided changes to make
  1065.           this manual format correctly with troff, and provided many
  1066.           useful bug reports and suggestions.
  1067.  
  1068.           Mark Alexander <amdahl!drivax!alexande>, who provided me
  1069.           with some bug fixes, and also some portability
  1070.           modifications and speed optimizations that are due to be
  1071.           incorporated into the next release.
  1072.  
  1073.      AUTHOR
  1074.           Rahul Dhesi
  1075.